package offer.tree;

public class TreeDepth {

    public static int treeDepth(TreeNode root) {
        if (root == null) {
            return 0;
        }
        return (Math.max(treeDepth(root.left),treeDepth(root.right)) + 1);
    }

}
